﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Chat
{
    /// <summary>
    /// Abstraction for event arguments to use in events rised upon receipt
    /// of chat commands. The idea is to inherit this abstract class for every
    /// specific chat command. All currently used chat commands are defined in the 
    /// MessagesLib project.
    /// </summary>
    /// <typeparam name="BaseCmd">
    /// On chat server side the BaseCmd will be one of the subordinate classes
    /// of the Server.ServerCmd class, while on chat client side it will be
    /// one of the subordinate classes of the Client.ClientCmd class.
    /// </typeparam>
    public abstract class CmdEventArgs<BaseCmd> : EventArgs where BaseCmd : Command
    {
        public BaseCmd CommandReceived { get; protected set; }
        public CmdEventArgs(BaseCmd commandReceived)
        {
            CommandReceived = commandReceived;
        }
    }
}
